﻿using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class TextMeshProMaterialChanger : MonoBehaviour
{
    public List<Material> materials = new List<Material>();
    [SerializeField]
    private TextMeshProUGUI tmp;
    public void ChangeTmpMaterial(int index)
    {
        if (tmp != null)
        {
            if (materials.Count > index && index >= 0)
            {
                tmp.fontSharedMaterial = materials[index];
            }
        }
    }
}
